how to solve a system substitution method